﻿using System;


namespace epicenter2010.Aggregates
{
	/// <summary>
	/// bstack @ 06/06/2010
	/// Contact detail value object
	/// </summary>
	public class ContactDetail
	{
		/// <summary>
		/// Email
		/// </summary>
		public readonly string Email;

		/// <summary>
		/// Phone
		/// </summary>
		public readonly long Phone;


		/// <summary>
		/// Ctor
		/// </summary>
		/// <param name="email"></param>
		/// <param name="phone"></param>
		public ContactDetail(
			string email,
			long phone)
		{
			epicenter2010.Common.DBCChecker.RequireArgument("phone", phone > 0 && phone.ToString().Length > 5, "Invalid phone");

			this.Email = email;
			this.Phone = phone;
		}
	}
}